home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Source Code
/
Libraries
/
XCMD libraries 960603
/
doXCMDPlusPlus.c
next >
Wrap
C/C++ Source or Header
|
1995-11-19
|
1KB
|
34 lines
#include <A4Stuff.h>
#include "doXCMDPlusPlus.h"
//••••••• Metrowerks sez....
//You must set up your main like this if you are going to use globals, strings or
//inter-segment calls. If you need to use Callbacks, please look for "68K App 68K
//Multi-Seg CR" in the 68K examples folder.
//•••••••
//••••••• What they didn't tell us or assumed we already knew...
// You must make all your declarations outide the scope of the routine which
// sets up and destroys the A4 world. If you do not and you execute a method
// after A4 world has been altered, life ends.
// i.e. an A4 world is created, an xcmd object is instantiated, the A4
// world is reset, then the destructor is called. If it is a
// virtual destructor (any time a virtual method is declared)
// all hell breaks loose after you return to the caller.
//•••••••
pascal void main( XCmdPtr paramPtr )
{
long oldA4 = SetCurrentA4(); // A4 must be set up for globals, strings, and
// inter-segment calls
doXCMDPlusPlus ( paramPtr ); // <--- your code goes here
SetA4(oldA4); // reset A4 before leaving XCMD
}